<%-- 
    Document   : login
    Created on : 24.1.2013, 19:36:23
    Author     : juro
--%>

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<!DOCTYPE html>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<f:message key="web.title" var="title" /> 
<s:layout-render name="/layout.jsp" title="${title}">        
    <s:layout-component name="content"> 
        
        <h1><f:message key="login.title" /></h1>
        
        <form name='f' action="<c:url value='j_spring_security_check' />" method='POST' class="form">
            
            <c:if test="${param.failed_login_attempt == '1'}">
                <ul class="errors">
                    <li><f:message key="login.failedLoginAttempt" /></li>
                </ul>
            </c:if>
            
            <div class="form-field">
                <label for="j_username"><f:message key="login.userName"/></label>
                <input id="j_username" name="j_username" type="text" value="" autofocus />
            </div>

            <div class="form-field">
                <label for="j_password"><f:message key="login.password" /></label>
                <input id="j_password" name="j_password" type="password" />
            </div>
            
            <div class="form-field">
                <a href="#" id="forgottenPassword"><f:message key="login.forgottenPassword" /></a>
            </div>
            
            <div class="form-field form-field-submit">
                <button name="submit" type="submit" value="1" class="button"><f:message key="login.submitLogin" /></button>
            </div>

	</form>
            
        <script>
            $(function() {
                
                $('#forgottenPassword').click(function() {
                    new scm.Dialog("<f:message key='login.forgottenPasswordMessage' />");
                })
                
                
            })
        </script>
            
    </s:layout-component>
</s:layout-render>
